
import { baseUrlConfig } from '@/config/config';
import request from '@/utils/request'

const bastPath = baseUrlConfig.processBaseUrl
const userBasePath = baseUrlConfig.enterpriseUrl
// 新增班组
export const scheduleGroupAdd = (data: any) => {
  return request({
    url: bastPath + '/quality/scheduleGroup/addGroup',
    method: 'put',
    data
  })
}
//修改班组信息
export const scheduleGroupUpdate = (data: any) => {
  return request({
    url: bastPath + '/quality/scheduleGroup/updateGroup',
    method: 'post',
    data
  })
}
//根据科室获取班组信息
export const getScheduleGroup= (data: any) => {
  return request({
    url: bastPath + '/quality/scheduleGroup/getGroup',
    method: 'post',
    data
  })
}
//根据班组查询人员列表
export const getUserListByScheduleGroup=(data:any)=>{
  return request({
    url: bastPath + '/quality/employee/find/page',
    method: 'post',
    data
  })
}
//查询班组下面所有人员
export const getUserListAllByScheduleGroup=(data:any)=>{
  return request({
    url: bastPath + '/quality/employee/find/all',
    method: 'post',
    data
  })
}
//移除人员
export const delUsers=(data:any)=>{
  return request({
    url: bastPath + '/quality/scheduleGroup/deleteGroup',
    method: 'post',
    data
  })
}
export const getUsersByorganId=(data:any)=>{
  return request({
    url: bastPath + '/quality/employee/getEmployee?createDept='+data.createDept+'&groupId='+data.groupId,
    method: 'get',
  })
}
//获取所有岗位
export const getPostList=(data:any)=>{
  return request({
    url: userBasePath + '/enterprise/position/find',
    method: 'post',
    data
  })
}
